package com.bonuo.crm.service.impl;

import com.bonuo.crm.domain.Payment;
import com.bonuo.crm.mapper.PaymentMapper;
import com.bonuo.crm.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class PaymentServiceImpl implements PaymentService {
    @Autowired
    private PaymentMapper paymentMapper;
    @Override
    public List<Payment> selectProjectPaymentList(Payment payment) {
        return paymentMapper.selectProjectPaymentList(payment);
    }

    @Override
    public int insertProjectPayment(Payment payment) {
        return paymentMapper.insertProjectPayment(payment);
    }

    @Override
    public int updateProjectPayment(Payment payment) {
        return paymentMapper.updateProjectPayment(payment);
    }

    @Override
    public int deleteProjectPaymentById(Integer id) {
        return paymentMapper.deleteProjectPaymentById(id);
    }

    @Override
    public BigDecimal selectRatioByProjectId(Integer projectId) {
        return paymentMapper.selectRatioByProjectId(projectId);
    }
}
